package org.freelunch.visitors;

import japa.parser.ast.Comment;
import japa.parser.ast.CompilationUnit;
import japa.parser.ast.body.BodyDeclaration;
import japa.parser.ast.body.TypeDeclaration;
import japa.parser.ast.expr.Expression;
import japa.parser.ast.expr.MethodCallExpr;
import japa.parser.ast.stmt.Statement;
import japa.parser.ast.visitor.VoidVisitor;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.IndexWriter;

/**
 * 
 * User: ganesh
 * Date: 4/2/12
 * Time: 3:44 AM
 * 
 */
public interface MethodVisitorInterface  {
    // add assert to doc thts all!
    void addAssertStatment(Statement st, Document doc, String name);

    void addBlockStatement(Statement st, Document doc, String name);

    void addBreakStatement(Statement st, Document doc);

    void addCatchClause(Statement st, Document doc, String name);

    void addContinue(Statement st, Document doc);

    void addStatement(Statement st, Document doc, String name);

    void addDoStmt(Statement st, Document doc, String name);

    void addExplicitConstructorInvocationStmt(Statement st, Document doc);

    void addExpressionStmt(Statement st, Document doc, String name);

    void addForEachStmt(Statement st, Document doc, String name);

    void addForStmt(Statement st, Document doc, String name);

    void addIfStmt(Statement st, Document doc, String name);

    void addLabelStmt(Statement st, Document doc, String name);

    void addReturnStmt(Statement st, Document doc);

    void addSwitchEntryStmt(Statement st, Document doc, String name);

    void addSwitchStmt(Statement st, Document doc, String name);

    void addSynchronizedStmt(Statement st, Document doc, String name);

    void addThrowStmt(Statement st, Document doc, String name);

    void addTryStmt(Statement st, Document doc, String name);

    void addTypeDeclStmt(Statement st, Document doc, String name);

    void addWhileStmt(Statement st, Document doc, String name);

    void addEmptyStmt(Statement st, Document doc);

    void addAnnotationExpr(Expression expr, Document doc, String name);

    void addArrayAccessExpr(Expression expr, Document doc, String name);

    void addArrayCreationExpr(Expression expr, Document doc, String name);

    void addArrayInitializerExpr(Expression expr, Document doc,
                                 String name);

    void addAssignExpr(Expression expr, Document doc, String name);

    void addBinaryExpr(Expression expr, Document doc, String name);

    void addBooleanLiteralExpr(Expression expr, Document doc, String name);

    void addCastExpr(Expression expr, Document doc, String name);

    void addCharLiteralExpr(Expression expr, Document doc, String name);

    void addClassExpr(Expression expr, Document doc, String name);

    void addConditionalExpr(Expression expr, Document doc, String name);

    void addDoubleLiteralExpr(Expression expr, Document doc, String name);

    void addEnclosedExpr(Expression expr, Document doc, String name);

    void addFieldAccessExpr(Expression expr, Document doc, String name);

    void addinstaceOfExpr(Expression expr, Document doc, String name);

    void addIntegerLiteralExpr(Expression expr, Document doc, String name);

    void addIntegerLiteralMinValExpr(Expression expr, Document doc,
                                     String name);

    void addLiteralExpr(Expression expr, Document doc, String name);

    void addLongLiteralExpr(Expression expr, Document doc, String name);

    void addLongLiteralMinValExpr(Expression expr, Document doc,
                                  String name);

    void addMarkerAnnoExpr(Expression expr, Document doc, String name);

    void addMemberValuePair(Expression expr, Document doc);

    void addMethodCallExpr(MethodCallExpr expr, Document doc, String name);

    void addNameExpr(Expression expr, Document doc, String name);

    void addNormalAnnoExpr(Expression expr, Document doc, String name);

    void addNullLiteralExpr(Expression expr, Document doc, String name);

    void addObjectCreationExpr(Expression expr, Document doc, String name);

    void addQualifiedNameExpr(Expression expr, Document doc, String name);

    void addSingleMemberAnnoExpr(Expression expr, Document doc,
                                 String name);

    void addStringLiteralExpr(Expression expr, Document doc, String name);

    void addSuperExpr(Expression expr, Document doc, String name);

    void addThisExpr(Expression expr, Document doc, String name);

    void addUnaryExpr(Expression expr, Document doc, String name);

    void addVariableDeclExpr(Expression expr, Document doc, String name);

    void addAnnotationDecl(TypeDeclaration typeDecl, Document doc);

    void addAnnotationMemeberDecl(BodyDeclaration typeDecl, Document doc);

    void addBodyDecl(TypeDeclaration typeDecl, Document doc);

    void addClassOrInterfaceDecl(TypeDeclaration typeDecl, Document doc);

    // add constructor throws,params,start,end,modifier to doc
    void addConstructorDecl(BodyDeclaration typeDecl, Document doc);

    void addEmptyMemeberDecl(BodyDeclaration typeDecl, Document doc);

    void addEmptyTypeDecl(TypeDeclaration typeDecl, Document doc);

    void addEnumConsDecl(BodyDeclaration typeDecl, Document doc);

    void addEnumDecl(BodyDeclaration typeDecl, Document doc);

    // adding field name,type,start,end,modifier to doc
    void addFieldDecl(BodyDeclaration typeDecl, Document doc);

    void addInitializerDecl(BodyDeclaration typeDecl, Document doc);

    void addJavaDocComment(Comment typeDecl, Document doc);

    // add method name,modifier,throws,params,start and end in primiary Doc and
    // internalVars, internalStmtBlock in internalDoc
    void addMethodDecl(BodyDeclaration typeDecl, Document doc, String name);

    void addModifierSet(TypeDeclaration typeDecl, Document doc);

    void addTypeParameter(Document doc);

    void addPackageDeclaration(Document doc);

    void addImportDecl(Document doc);

    void addCompilationUnit(Document doc);

    void visit(CompilationUnit cu, IndexWriter indexWriter,
               String absolutePath);
}
